package com.company;


import java.util.Scanner;
import java.util.Stack;

/**
 * @author Administrator
 */

public class HJ12字符串反转 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String input = scanner.nextLine();
       // System.out.println(new StringBuffer(input).reverse().toString());
       // scanner.close();

        Stack stack = new Stack(); // 栈
        char[] chars = input.toCharArray();
        for (int i = 0; i < chars.length; i++) {
            stack.push(chars[i]);
        }
        while ( !stack.isEmpty()){
            System.out.print(stack.pop());
        }
    }

}
